-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an Uncompressor #49
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Checked commits imtayadeway/manageiq-api@4b8196c~...b191b9a with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Any chance this will be morphing data blocks, not necessarily MiQ object resource attributes ? |
imtayadeway
added a commit
to imtayadeway/manageiq-api
that referenced
this pull request
Sep 18, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of solving two problems at once: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
imtayadeway
added a commit
to imtayadeway/manageiq-api
that referenced
this pull request
Sep 18, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of killing two birds with one stone: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
imtayadeway
added a commit
to imtayadeway/manageiq-api
that referenced
this pull request
Sep 18, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of killing two birds with one stone: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
imtayadeway
added a commit
to imtayadeway/manageiq-api
that referenced
this pull request
Sep 18, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of killing two birds with one stone: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
imtayadeway
added a commit
to imtayadeway/manageiq-api
that referenced
this pull request
Sep 18, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of killing two birds with one stone: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
alexander-demicev
pushed a commit
to alexander-demicev/manageiq-api
that referenced
this pull request
Oct 5, 2017
Support for compressed ids was added and enabled by default (rendering all ids in their compressed form) with the thought of killing two birds with one stone: 1. javascript doesn't support very large numbers 2. we wanted to add support for compressed ids It turns out that (2) wasn't solving any problems in UI land anymore. With the added complexity and emerging issues¹ that came as a result of this change, it seemed better to remove the compressed id support and simply render all ids as strings instead, which is sufficient to solve the javascript large numbers issue. Support for incoming compressed ids in URLs has been left, since this has already been incorporated into the Fine release. 1. See ManageIQ#49, ManageIQ/manageiq#15658
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The problem
Since we're accepting incoming compressed ids in place of actual ids, they will occasionally be passed to things that aren't expecting them, and definitely shouldn't. We don't want to update every method that deals with an id somewhere to uncompress it. (see Dialogs/Dialog Fields)
The solution
I've added an
Uncompressor
service which gets executed when the body is parsed. It will traverse the body, looking for things to uncompress, and will uncompress them. This seems like the right place to do it, since it only needs to happen once and nothing else will need to know about compressed ids/cc @jntullo @eclarizio
@miq-bot add-label enhancement, technical debt
@miq-bot assign @abellotti